#!
$FileName = "files\\file.txt";
if(open(MYFILE,$FileName))
{
	print "Open file OK!\n";
}
else
{
	print "error when open $FileName!\n";
	exit -1;
}
close MYFILE;

print "try to open an empty file!\n";
open (F,"") || warn "Can not open file! $!\n";
close F;
print "program continues";